
import java.math.BigInteger;

public class Main {
    public static void main(String[] args) {
        // 初始值 (2 + 3i)^1
        BigInteger a = BigInteger.valueOf(2);  // 实部
        BigInteger b = BigInteger.valueOf(3);  // 虚部

        // 计算 (2 + 3i)^123456
        int exponent = 123456;
        for (int i = 1; i < exponent; i++) {
            BigInteger newA = a.multiply(BigInteger.valueOf(2)).subtract(b.multiply(BigInteger.valueOf(3)));
            BigInteger newB = a.multiply(BigInteger.valueOf(3)).add(b.multiply(BigInteger.valueOf(2)));
            a = newA;
            b = newB;
        }

        // 格式化输出
        String result = a.toString();
        if (b.signum() >= 0) {
            result += "+" + b.toString();
        } else {
            result += b.toString();  // 负数自带"-"
        }
        result += "i";
        System.out.println(result);
    }
}